Skip to content

Conversation

raka-gunarto
Copy link

@raka-gunarto raka-gunarto commented Aug 14, 2025

Sometimes you're behind a corporate firewall like Cisco Umbrella which does funny business like adding redirections. Add redirect domain allowlist with environment variable.

Example use:

  • set env var HF_DOWNLOAD_REDIRECT_ALLOWLIST=opendns.com if there's a corp firewall redirecting your web requests to opendns.com

@raka-gunarto raka-gunarto force-pushed the raka-gunarto/allow-redirects-with-env-var branch 2 times, most recently from 4389869 to 5f2febd Compare August 14, 2025 14:42
@raka-gunarto
Copy link
Author

This has been tested successfully behind a Cisco Umbrella firewall inserting redirects to opendns.com, can someone please review?

@raka-gunarto raka-gunarto force-pushed the raka-gunarto/allow-redirects-with-env-var branch from 5f2febd to 47f0cc4 Compare August 14, 2025 14:53
@raka-gunarto raka-gunarto force-pushed the raka-gunarto/allow-redirects-with-env-var branch from 47f0cc4 to 281d675 Compare August 14, 2025 15:35
@hanouticelina
Copy link
Contributor

Hi @raka-gunarto,
rather than modifying the client to follow redirects to third party domains (I would prefer not to add external redirect logic to the client), would it be possible on your side to either:

@raka-gunarto
Copy link
Author

Yeah we did that in the end, but can it not silently fail as well? I was scratching my head for hours, because it just thinks it reached a CDN and then silently dies because it doesn't see what it expects to see.

@hanouticelina
Copy link
Contributor

@raka-gunarto could you open an issue with a minimal script that reproduces the issue with the full log output with HF_DEBUG environment variable set to 1 and your environment info (you can run the hf env command and copy paste the output)? thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants